Visual Basic (Declaration) | |
---|---|
Public Overloads Sub HitTestAsync( _ ByVal intersectingPoint As Point, _ ByVal maxHits As Integer, _ ByVal hitTestBehavior As MessageLayerHitTestBehavior, _ ByVal resultCallback As Action(Of IList(Of Message)) _ ) |
C# | |
---|---|
public void HitTestAsync( Point intersectingPoint, int maxHits, MessageLayerHitTestBehavior hitTestBehavior, Action<IList<Message>> resultCallback ) |
Note that is is necessary to account for the difference between Map and application origin by using code similar to the following to perform a Transform on the input screen Point:
GeneralTransform generalTransform = MyMap.TransformToVisual(Application.Current.MainWindow); System.Windows.Point transformScreenPoint = generalTransform.Transform(screenPoint);
Parameters
- intersectingPoint
- A System.Windows.Point representing the position on the map in screen coordinates.
- maxHits
- A System.Int32 representing the maximum number of hits to retrieve. Use this parameter to improve performance.
- hitTestBehavior
- A MessageLayerHitTestBehavior value determining how hit test calls are filtered to improve performance.
- resultCallback
- The Action that will be called with the hit test result as a IList of Messages. If no Message was hit, null will be passed to the callback.
Target Platforms: Windows XP Professional, Windows Server 2003 family, Windows Vista, Windows Server 2008 family, Windows 7, Windows 8